package com.bc;
class Parent{
    private int a;
    protected int b;
    public Parent(int a){
        this.a=a;
        System.out.println("父类诞生了");
    }
    public int getA(){
        return this.a;
    }
}

class Son extends Parent{
    private int b;
    public Son(int a,int b){
        super(a);
        this.b=b;
        super.b=++b;
        System.out.println("子类诞生了");
    }
    public void print(){
        System.out.println(String.format("a=%s,b of son is %s,b of derived from parent is %s",super.getA(),this.b,super.b));
    }
}
public class entendsOrder {
    public static void main(String[] args) {
        Son son=new Son(1,2);
        son.print();
    }
}
